package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.result.HouseListBean;
import com.common.retrofit.entity.result.NewHouseInfoBean;
import com.common.retrofit.service.HaiNingService;

import java.util.ArrayList;

import rx.Observable;
import rx.Subscriber;

public class NewHouseInfoMethods extends BaseMethods {

    private static NewHouseInfoMethods m_ins = null;

    public static NewHouseInfoMethods getInstance() {
        if (m_ins == null) {
            synchronized (NewHouseInfoMethods.class) {
                if (m_ins == null) {
                    m_ins = new NewHouseInfoMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "House/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }

    // 获取首页数据
    public void new_house_info(Subscriber<NewHouseInfoBean> subscriber, String loupan_id, String huxing_id ,String uid) {
        Observable observable = initService().new_house_info(System.currentTimeMillis()+"",
                "1387bd345f71ff31e8253477f41c0227",loupan_id,huxing_id ,uid
        );
        toSubscribe(observable, subscriber);
    }
}
